//
// Created by wkm on 2023-12-05.
//

#include "mod_counter.h"

void mod_counter::prc_counter() {
    if (clear) {
        counter = 0;
    } else {
        counter = (counter.read() + 1) % UPTO;
    }
}

void mod_counter::prc_outputs() {
    q = counter.read();
    qbar = -counter.read();
}

